package cn.zhiyong.pr.addItem;

import java.awt.Font;
import java.awt.GraphicsEnvironment;

import javax.swing.text.BadLocationException;
import javax.swing.text.DefaultStyledDocument;
import javax.swing.text.StyledDocument;

import cn.zhiyong.pr.main.MyConstant;

public class ContentPanel_bean {
	private String[] sysFonts = GraphicsEnvironment
			.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
	private Font font = new Font(MyConstant.font_song, Font.PLAIN, 14);
	private Integer[] fontSizeFamily = { 8, 10, 12, 14, 16, 18, 20, 22, 24, 26,
			28, 30, 36, 38, 40, 46, 48 };
	private StyledDocument doc=new DefaultStyledDocument();
	private boolean allEditable=true;
//	end of definition

	public String[] getSYSFonts() {
		return sysFonts;
	}


	public Integer[] getFontSizeFamily() {
		return fontSizeFamily;
	}


	public void clearDocument() {
		try {
			doc.remove(0, doc.getLength());
		} catch (BadLocationException e) {
			e.printStackTrace();
		}
		
	}

	public boolean isAllEditable() {
		return allEditable;
	}

	public void setAllEditable(boolean editable) {
		this.allEditable = editable;
	}

	public StyledDocument getDoc() {
		return doc;
	}
	
	public void setDoc(StyledDocument doc) {
		this.doc=doc;
	}

	public Font getDefaultFont() {
		return font;
	}

}
